package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Yuyue;
import com.zzyx.dao.YuyueDao;
import com.zzyx.service.YuyueService;

public class YuyueServiceImpl implements YuyueService {
	private YuyueDao yuyueDao;

	public YuyueDao getYuyueDao() {
		return yuyueDao;
	}

	public void setYuyueDao(YuyueDao yuyueDao) {
		this.yuyueDao = yuyueDao;
	}

	public void delete(Yuyue e) {
		yuyueDao.delete(e);
	}

	public void deleteAll(Collection<Yuyue> c) {
		yuyueDao.deleteAll(c);

	}

	public void deleteById(Class<Yuyue> entityClass, Integer id) {
		yuyueDao.deleteById(entityClass, id);

	}

	public List<Yuyue> findAll(Class<Yuyue> entityClass) {

		return yuyueDao.findAll(entityClass);
	}

	public List<Yuyue> findByAll(DetachedCriteria dc) {
		return yuyueDao.findByAll(dc);
	}

	public List<Yuyue> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return yuyueDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Yuyue> findByCriteria(DetachedCriteria dc) {

		return yuyueDao.findByCriteria(dc);
	}

	public List<Yuyue> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return yuyueDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Yuyue findById(Class<Yuyue> entityClass, Integer id) {
		return yuyueDao.findById(entityClass, id);
	}

	public List<Yuyue> findByProperty(Class<Yuyue> entityClass,
			String propertyName, Object value, int type) {
		return yuyueDao.findByProperty(entityClass, propertyName, value, type);
	}

	public Yuyue findUniqueResult(String sql) {
		return yuyueDao.findUniqueResult(sql);
	}

	public void save(Yuyue entity) {
		yuyueDao.save(entity);
	}

	public void saveOrUpdate(Yuyue entity) {
		yuyueDao.saveOrUpdate(entity);

	}
	public void update(Collection<Yuyue> c) {
		yuyueDao.update(c);
	}
	
	public List<Yuyue> findByHql(String hql) {
		return yuyueDao.findByHql(hql);
	}

	
	public List<Yuyue> findByHql(String hql, int page, int max) {
		// TODO Auto-generated method stub
		return yuyueDao.findByHql(hql, page, max);
	}

	
	public void update(Yuyue entity) {
		// TODO Auto-generated method stub
		yuyueDao.update(entity);
	}
}
